home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / ifl / pbm.z / pbm
Encoding:
Text File  |  2002-10-03  |  4.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ppppbbbbmmmm((((5555))))            IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll             ppppbbbbmmmm((((5555))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      pbm - portable bitmap file format
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The portable bitmap format is a lowest common denominator monochrome file
  13.      format.  It was originally designed to make it reasonable to mail bitmaps
  14.      between different types of machines using the typical stupid network
  15.      mailers we have today.  Now it serves as the common language of a large
  16.      family of bitmap conversion filters.  The definition is as follows:
  17.  
  18.      - A "magic number" for identifying the file type.  A pbm file's magic
  19.        number is the two characters "P1".
  20.  
  21.      - Whitespace (blanks, TABs, CRs, LFs).
  22.  
  23.      - A width, formatted as ASCII characters in decimal.
  24.  
  25.      - Whitespace.
  26.  
  27.      - A height, again in ASCII decimal.
  28.  
  29.      - Whitespace.
  30.  
  31.      - Width * height bits, each either '1' or '0', starting at the top-left
  32.        corner of the bitmap, proceeding in normal English reading order.
  33.  
  34.      - The character '1' means black, '0' means white.
  35.  
  36.      - Whitespace in the bits section is ignored.
  37.  
  38.      - Characters from a "#" to the next end-of-line are ignored (comments).
  39.  
  40.      - No line should be longer than 70 characters.
  41.  
  42.      Here is an example of a small bitmap in this format:
  43.      P1
  44.      # feep.pbm
  45.      24 7
  46.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  47.      0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
  48.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  49.      0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
  50.      0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
  51.      0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
  52.      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  53.  
  54.      Programs that read this format should be as lenient as possible,
  55.      accepting anything that looks remotely like a bitmap.
  56.  
  57.      There is also a variant on the format, available by setting the RAWBITS
  58.      option at compile time.  This variant is different in the following ways:
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ppppbbbbmmmm((((5555))))            IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll             ppppbbbbmmmm((((5555))))
  71.  
  72.  
  73.  
  74.      - The "magic number" is "P4" instead of "P1".
  75.  
  76.      - The bits are stored eight per byte, high bit first low bit last.
  77.  
  78.      - No whitespace is allowed in the bits section, and only a single
  79.        character of whitespace (typically a newline) is allowed after the
  80.        height.
  81.  
  82.      - The files are eight times smaller and many times faster to read and
  83.        write.
  84.  
  85. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  86.      atktopbm(1), brushtopbm(1), cmuwmtopbm(1), g3topbm(1), gemtopbm(1),
  87.      icontopbm(1), macptopbm(1), mgrtopbm(1), pi3topbm(1), xbmtopbm(1),
  88.      ybmtopbm(1), pbmto10x(1), pnmtoascii(1), pbmtoatk(1), pbmtobbnbg(1),
  89.      pbmtocmuwm(1), pbmtoepson(1), pbmtog3(1), pbmtogem(1), pbmtogo(1),
  90.      pbmtoicon(1), pbmtolj(1), pbmtomacp(1), pbmtomgr(1), pbmtopi3(1),
  91.      pbmtoplot(1), pbmtoptx(1), pbmtox10bm(1), pbmtoxbm(1), pbmtoybm(1),
  92.      pbmtozinc(1), pbmlife(1), pbmmake(1), pbmmask(1), pbmreduce(1),
  93.      pbmtext(1), pbmupc(1), pnm(5), pgm(5), ppm(5)
  94.  
  95. AAAAUUUUTTTTHHHHOOOORRRR
  96.      Copyright (C) 1989, 1991 by Jef Poskanzer.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.